package com.cwd.arm.infrastructure.dao.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cwd.arm.infrastructure.dao.PayDao;
import com.cwd.arm.infrastructure.dao.base.DaoImpl;
import com.cwd.arm.infrastructure.mapper.PayMapper;
import com.cwd.arm.infrastructure.po.PayPo;
import com.cwd.arm.infrastructure.query.PayDaoQuery;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* Description:现金支出
* Created on 2021年11月20日
* @author  yan
*/
@Service
public class PayDaoImpl extends DaoImpl<PayMapper, PayPo> implements PayDao {

    @Override
    public List<PayPo> selectByQuery(PayDaoQuery daoQuery) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq(ObjectUtils.isNotEmpty(daoQuery.getProjectId()), "project_id", daoQuery.getProjectId());
        return list(queryWrapper);
    }

}
